<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>403</title>
</head>
<style>
    body{
        /*background: #f2f2f2;*/
    }
    .box{
        text-align: center;
        margin-top: 5%;
    }
    .code{
        font-size: 2.2rem;
        margin-top: 1.5rem;
        color: #424141;
    }
    .text{
        font-size: 1.2rem;
        margin-top: 1.5rem;
        color: #424141;
    }
    .btn{
        padding: 6px 10px;
        margin-top: 2rem;
        display: inline-block;
        border-radius: 4px;
        cursor: pointer;
        border: 1px solid #58a7eb;
        color: #58a7eb;
    }
    .btn:hover{
        opacity: 0.5;
    }
</style>
<body>
    <div class="box">
        <img th:src="@{/images/error/403.png}" style="width: 20rem;">
        <div class="code">403</div>
        <div class="text">未授权，请前往登录页面进行身份验证</div>
        <span class="btn" onclick="openLogin()">前往验证</span>
    </div>
</body>
<script type="text/javascript" th:inline="javascript">
    // 获取项目名称（如：/project-name/）
    /*<![CDATA[*/
    var ctxPath = /*[[@{/}]]*/ '';
    /*]]>*/
</script>
<script>
    function openLogin() {
        window.location.href = ctxPath+"login";
    }
</script>
</html>